﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LX.Web.Excel
{
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Class,  AllowMultiple = true, Inherited = true)]
    public class ExportAttribute : Attribute
    {
        public ExportAttribute()
        {
            BackBround = ExcelCellBg.Normal;
            Precision = 1;
        }
        public ExportAttribute(String name)
        {
            Name = name;
            BackBround = ExcelCellBg.Normal;
            Precision = 1;
        }

        public ExportAttribute(String name,int precision)
        {
            Name = name;
            BackBround = ExcelCellBg.Normal;
            Precision = precision;
        }
        public ExportAttribute(String name, string format)
        {
            Name = name;
            BackBround = ExcelCellBg.Normal;
            Precision = 1;
            Format = format;
        }
        public ExportAttribute(String name, int precision,string format)
        {
            Name = name;
            BackBround = ExcelCellBg.Normal;
            Precision = precision;
            Format = format;
        }
        public String Name { get; set; }

        public int Colspan { get; set; }

        /// <summary>
        /// 纵向合并
        /// </summary>
        public bool MergeVertical { get; set; }

        /// <summary>
        /// 背景色
        /// </summary>
        public ExcelCellBg BackBround { get; set; }

        public String Format { get; set; }

        public int Precision { get; set; }
    }

}
